package controller.action;

import model.service.ExpertService;

import com.opensymphony.xwork2.ActionSupport;

public class ExpertAction extends ActionSupport{
	private String result;
	private String Info;
	private ExpertService expertService;
	private int pageNum;
	
	public String getResult() {
		return result;
	}
	public void setInfo(String info) {
		Info = info;
	}
	public void setExpertService(ExpertService expertService) {
		this.expertService = expertService;
	}
	
	public void setPageNum(int pageNum) {
		this.pageNum = pageNum;
	}
	public String add(){
		result = expertService.addExpert(Info);
		return SUCCESS;
	}
	public String modify()
	{
		result = expertService.modify(Info);
		return SUCCESS;
	}
	public String getList()
	{
		result = expertService.getList(pageNum);
		return SUCCESS;
	}
	public String query()
	{
		result = expertService.query(Info);
		return SUCCESS;
	}
	public String delete()
	{
		result= expertService.deleteAll(Info);
		return SUCCESS;
	}
	public String allocate()
	{
		result = expertService.allocationAll();
		return SUCCESS;
	}

}
